package cn.openea.perpartner.system.mapper;

import cn.openea.perpartner.system.entity.SysUser;
import cn.openea.perpartner.system.entity.dto.UserInfoDto;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface SysUserMapper extends MPJBaseMapper<SysUser> {
    @Select("select a.*,b.openid from sys_user a left join sys_user_union b on a.userid = b.userid where a.userid=b.userid and a.updatetime between #{startTime} and #{endTime}")
    List<UserInfoDto> selectAsyncList(@Param("startTime")String startTime, @Param("endTime")String endTime);

    @Select("select a.*,b.openid from sys_user a left join sys_user_union b on a.userid = b.userid where a.userid=b.userid and a.userid=#{userid}")
    UserInfoDto selectByUserId(@Param("userid")String userid );
}

